<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/resources/jstl_contexpath.jsp"%>
<div id="sidebar-left" class="col-lg-2 col-sm-1" style="min-height: 900px">
    <div class="nav-collapse sidebar-nav collapse navbar-collapse bs-navbar-collapse">
        <ul class="nav nav-tabs nav-stacked main-menu">
            <c:forEach var="user_menu" items="${user.menu_list}" varStatus="usermenu">
                <c:choose>
                    <c:when test="${user_menu.sub_menu_size == 0}">
                        <li>
                            <a href="${ctx}/${user_menu.parent_menu.menu_url}"><i class="${user_menu.parent_menu.css}"></i><span class="hidden-sm"> ${user_menu.parent_menu.menu_name}</span></a>
                        </li>
                    </c:when>
                    <c:otherwise>
                        <li>
                            <a class="dropmenu" href="#">
                                <i class="${user_menu.parent_menu.css}"></i><span class="hidden-sm"> ${user_menu.parent_menu.menu_name}</span> <span class="label"> ${user_menu.sub_menu_size}</span>
                            </a>
                            <ul>
                                <c:forEach var="sub_menu" items="${user_menu.sub_menu}" varStatus="submenu">
                                    <li><a class="submenu" href="${ctx}/${sub_menu.menu_url}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i class="${user_menu.parent_menu.css}"></i><span class="hidden-sm"> ${sub_menu.menu_name}</span></a></li>
                                </c:forEach>
                            </ul>
                        </li>
                    </c:otherwise>
                </c:choose>
            </c:forEach>
        </ul>
    </div>
</div>